<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一题</title>
</head>

<body>
    <script>
        function getArray() {
            let arr = []
            let j = 0
            for (let i = 1; i <= 150; i++) {
                if ((i % 7 === 0 && i % 5 != 0) || i % 9 === 0) {
                    arr[j] = i
                    j++
                    if (j === 23) {
                        break
                    }
                }
            }
            // console.log(j)
            console.log(arr)
            for (let i = 0; i < arr.length; i++) {
                if (arr[i] % 10 === 8) {
                    // console.log(arr[i])
                    arr[i] = { number: arr[i] }
                }
            }
            console.log(arr);
        }
        getArray()
    </script>
</body>

</html>